# coding=utf-8

# 字符串长度常量
NAME_CHAR_LEN = 128
PASSWORD_CHAR_LEN = 128
REMARK_CHAR_LEN = 256
PERMISSION_CODE_CHAR_LEN = 256
PERMISSION_ACTION_CHAR_LEN = 256
NAVIGATION_BAR_ICON_CHAR_LEN = 32
NAVIGATION_BAR_NAME_CHAR_LEN = 64
AUTH_CATEGORY_NAME_CHAR_LEN = 64
AUTH_NAME_CHAR_LEN = 64
AUTH_PERMISSION_ACTION_CHAR_LEN = 64
URL_CHAR_LEN = 128
FIELD_NAME_CHAR_LEN = 128
FORMAT_NAME_CHAR_LEN = 128
PROTOCOL_NAME_CHAR_LEN = 128
STATE_CHAR_LEN = 16
OPR_TYPE_CHAR_LEN = 64
ALARM_TYPE_CHAR_LEN = 64
VALVE_TYPE_CHAR_LEN = 16
VALUE_CHAR_LEN = 256
ACTION_TYPE_CHAR_LEN = 256
MSG_CHAR_LEN = 128
UNIQUE_FLAG_CHAR_LEN = 128
DATA_CHAR_LEN = 256

# 值未知常量值
UNKNOWN_VALUE = -1
UNKNOWN_STATE = 'known'

# 仪表阀门状态常亮值
VALVE_STATE_OPEN = 1
VALVE_STATE_CLOSE = 0

# 仪表充值状态
RECHARGE_STATE_OPEN = 1
RECHARGE_STATE_CLOSE = 0

# 仪表状态
METER_STATE_NORMAL = 'normal'
METER_STATE_ERROR = 'error'

# 电池欠压状态
BATTERY_PRESSURE_STATE_NORMAL = 1
BATTERY_PRESSURE_STATE_ERROR = 0

# 阀门异常标志
VALVE_ERROR_FLAG_TRUE = 1
VALVE_ERROR_FLAG_FALSE = 0

# 传感器状态异常
SENSOR_ERROR_FLAG_TRUE = 1
SENSOR_ERROR_FLAG_FALSE = 0

# 欠费状态
OWE_STATE_TRUE = 1
OWE_STATE_FALSE = 0

# 仪表在线状态
STATE_ONLINE = 'online'
# 仪表离线状态
STATE_OFFLINE = 'offline'

